import upload from '@/utils/upload'
import request from '@/utils/request'

// 通用上传单个文件请求
export function comonUpload(data) {
    return upload({
        url: '/front/common/upload',
        name: data.name,
        filePath: data.filePath
    })
}

// 省市区接口
export function areaComboList(cityId) {
    return request({
        url: '/front/area/list?level=3&parentId=' + cityId,
        'method': 'get',
    })
}

// 查询商圈列表
export function businessCircle(cityId) {
    return request({
        url: '/front/apartment/circle/list?cityId=' + cityId,
        'method': 'get',
    })
}

// 省市区接口
export function attractions(cityId) {
    return request({
        url: '/front/apartment/attractions/list?cityId=' + cityId,
        'method': 'get',
    })
}

// 广告位
export function adList(data) {
    return request({
        url: '/front/ad/apartment/list',
        'method': 'get',
        data: data
    })
}

// 图片上传
export function uploadImg(filePath) {
    return upload({
        url: '/front/common/upload',
        name: 'file',
        filePath: filePath
    })
}